package com.cby.operation.sdk

/**
 * @description: SDKConstant
 *
 * @author ChenBaoyang
 * @date 7/21/21 16:03
 */

const val HYKB_PACKAGE_NAME: String = "com.xmcy.hykb"
const val HYKB_LOGIN_ACTIVITY = "com.xmcy.hykb.app.ui.mine.AuthorizeUserActivity"

/**
 * 登录请求的参数key
 */
const val KEY_APP_ID = "app_id"
const val KEY_GAME_NAME = "app_name"
const val KEY_GAME_ICON = "app_icon"
const val KEY_SIGN_INFO = "sign_info"
const val KEY_USER_INFO_SDK_QUEST = "user_info_sdk_quest"
const val VALUE_USER_INFO_SDK_QUEST = "login_from_purchasesdk"

/**
 * 登录返回的参数key
 */
const val KEY_USER_ID = "user_info_sdk_id"
const val KEY_USER_TOKEN = "user_info_sdk_token"
const val KEY_USER_LOGIN_TYPE = "user_info_sdk_type"
const val KEY_USER_NICK = "user_info_sdk_nick"
const val KEY_USER_FAILING_MSG = "user_info_sdk_failmsg"

/**
 * 定义下登录常见的code，这个对外给游戏开发者的
 */
const val CODE_LOGIN_SUCCESS = 100
const val CODE_LOGIN_FAIL = 2002
const val CODE_LOGIN_CANCEL = 2003
const val CODE_LOGIN_DATA_EXCEPTION = 2004
const val CODE_LOGIN_EXIT_GAME = 2005
const val CODE_LOGIN_AGAIN = 2006
const val CODE_LOGIN_AGAIN_CLOSE = 2007
const val CODE_LOGIN_ANTI_CLOSE = 2008

/**
 * 定义下登录常见的code和msg，用来回调对外给游戏开发者的
 */
const val MSG_LOGIN_CANCEL = "取消登录"
const val MSG_LOGIN_DATA_EXCEPTION = "登录数据异常"

/**
 * 本地自己定义的常规的参数错误，code以-1000开始累计
 */

/** activity是空 */
const val ERR_CODE_ACTIVITY_IS_NULL = -1001
const val ERR_MSG_SDK_ACTIVITY_IS_NULL = "activity不能为空"

/** 网络异常 */
const val ERR_CODE_NETWORK_ERROR: Int = -1002
const val ERR_MSG_NETWORK_ERROR = "网络异常，请检查网络"

/** SDK未进行初始化成功  */
const val ERR_CODE_SDK_NOT_INIT_OK = -1003
const val ERR_MSG_SDK_NOT_INIT_OK = "未进行初始化"

/** SDK未进行登录  */
const val ERR_CODE_SDK_NOT_LOGIN = -1004
const val ERR_MSG_SDK_LOGIN_EXCEPTION = "SDK未登录或者账号信息失效"


/** SDK 支付参数商品名称空了  */
const val ERR_CODE_PAY_GOOD_EMPTY = -1004
const val ERR_MSG_PAY_GOOD_EMPTY = "商品名称不能为空"

/** SDK 支付参数商品名称超过16个字符  */
const val ERR_CODE_PAY_GOOD_LENGTH_OVER = -1005
const val ERR_MSG_PAY_GOOD_LENGTH_OVER = "商品名称不能超过16个字符"

/** SDK 支付参数商品金额必须要大于0  */
const val ERR_CODE_PAY_MONEY_NEED_OVER_ZERO = -1006
const val ERR_MSG_PAY_MONEY_NEED_OVER_ZERO = "金额必须大于0"

/** SDK 支付参数商品金额最大不超过五万  */
const val ERR_CODE_PAY_MONEY_NEED_LESS_5W = -1007
const val ERR_MSG_PAY_MONEY_NEED_LESS_5W = "最大金额不允许超过5万"

/** SDK 支付参数商品游戏订单号不能为空  */
const val ERR_CODE_PAY_CP_ORDER_EMPTY = -1008
const val ERR_MSG_PAY_CP_ORDER_EMPTY = "cpOrderId不能为空"

/** sdk 支付参数的订单好长度过长  */
const val ERR_CODE_PAY_CP_ORDER_LENGTH_OVER = -1009
const val ERR_MSG_PAY_CP_ORDER_LENGTH_OVER = "cpOrderId不能超过128位"


/** 退出游戏操作 */
const val ERR_CODE_EXIT_GAME = -2005
const val ERR_MSG_EXIT_GAME = "退出游戏"

/** 通用的弹窗关闭code */
const val ERR_CODE_DIALOG_CLOSE = -2008
const val ERR_MSG_DIALOG_CLOSE = "弹窗关闭";

/** 服务端请求异常 这个是SDK本地增加的code */
const val ERR_CODE_SERVER_EXCEPTION = -1
const val ERR_MSG_SERVER_EXCEPTION = "服务端异常"



/********************************** 网络请求code *******************************/

/** 成功（通用） */
const val CODE_SUCCESS = 1000

/** 游戏维护中 */
const val CODE_GAME_MAINTENANCE = 1102

/** 用户认证失败  */
const val CODE_USER_AUTH_FAILED = 2001

/** 你的账号已被封禁  */
const val CODE_USER_BANNED = 2002

/** 账号被抢登  */
const val CODE_USER_ROBBED = 2003

/** 充值维护中 */
const val CODE_PAY_MAINTENANCE = 2102

/** CP订单号错误 */
const val CODE_ORDER_ERROR = 2103

/** 支付限额  */
const val CODE_PAY_LIMIT = 2106

/** 充值已关闭  */
const val CODE_PAY_CLOSE = 2191

/** 未查询到订单状态，这个状态是用来轮询订单状态的判断  */
const val CODE_ORDER_NOT_FIND = 2199

/** 关闭支付弹窗面板的回调code  */
const val CODE_PAY_DIALOG_CLOSE = 3001
const val ERR_MSG_PAY_DIALOG_CLOSE = "支付弹窗关闭"

/** 关闭支付限额弹窗面板的回调code  */
const val CODE_PAY_LIMIT_DIALOG_CLOSE = 3002
const val ERR_MSG_PAY_LIMIT_DIALOG_CLOSE = "支付限额弹窗关闭"

/** 关闭支付结果弹窗面板的回调code  */
const val CODE_PAY_RESULT_DIALOG_CLOSE = 3003
const val ERR_MSG_PAY_RESULT_DIALOG_CLOSE = "支付结果弹窗关闭"

/** 关闭支付订单重新查询弹窗面板的回调code  */
const val CODE_PAY_RETRY_DIALOG_CLOSE = 3004
const val ERR_MSG_PAY_RETRY_DIALOG_CLOSE = "支付订单重新查询弹窗关闭"



/**
 * 通用的常量
 */
const val KEY_RESPONSE_CODE = "code"
const val KEY_RESPONSE_MSG = "msg"
const val KEY_RESPONSE_DATA = "data"
const val KEY_RESPONSE_RESULT = "result"
const val KEY_RESPONSE_PAY_ORDER = "orderId"
const val KEY_RESPONSE_PAY_TYPE = "payType"
const val KEY_RESPONSE_PAY_PARAMS = "payParams"
const val KEY_RESPONSE_URL = "url"
const val KEY_RESPONSE_PARAM = "params"
const val KEY_RESPONSE_MONEY_NAME = "moneyName"
const val KEY_RESPONSE_MONEY_RATE = "moneyRate"
const val KEY_RESPONSE_PAY_CHANNELS = "channels"
const val KEY_RESPONSE_PAY_RETRIES = "retries"
const val KEY_RESPONSE_PAY_CONTACT = "contact"
const val KEY_RESPONSE_MAINTENANCE_CONTENT = "maintenanceContent"

const val KEY_RESPONSE_PAY_TIPS = "tips"

const val KEY_RESPONSE_PAY_LIMIT_CONTENT = "content"
const val KEY_RESPONSE_PAY_LIMIT_LINK = "link"
const val KEY_RESPONSE_PAY_LIMIT_NAME = "name"
const val KEY_RESPONSE_PAY_LIMIT_URL = "url"
const val KEY_RESPONSE_PAY_LIMIT_ACTION = "action"
const val KEY_RESPONSE_PAY_LIMIT_BUTTONS = "buttons"

const val KEY_RESPONSE_ACCESS_TOKEN = "access_token"

const val KEY_GAME_ID = "gameId"
const val KEY_PAY_MONEY = "money"
const val KEY_PAY_GAME_ORDER = "cpOrderId"
const val KEY_PAY_USER_NAME = "userName"
const val KEY_PAY_ORDER = "orderId"
const val KEY_PAY_TYPE = "payType"
const val KEY_PAY_GAME_SERVER = "server"
const val KEY_PAY_GOODS_NAME = "goodsName"
const val KEY_PAY_EXT = "ext"
const val KEY_TIME_STAMP = "time"
const val KEY_SIGN = "sign"
const val KEY_CONTENT = "content"
const val KEY_VERSION = "version"
const val KEY_PAY_CALLBACK = "pay_callback"


const val STRING_EXIT_GAME = "退出游戏"
const val STRING_SWITCH_ACCOUNT = "切换账号"
const val STRING_LOGIN_AGAIN = "重新登录"
const val STRING_EXIT_GAME_OR_LOGOUT = "退出游戏或者注销账号"

const val ACTION_TIP_NEGATIVE_EXIT_GAME = 20003
const val ACTION_TIP_POSITIVE_SWITCH_ACCOUNT = 20004
const val ACTION_TIP_POSITIVE_LOGIN_AGAIN = 20005
const val ACTION_TIP_POSITIVE_LOGIN_AGAIN_CLOSE = 20006


/**
 * 防沉迷和限额的事件常量
 */
const val ACTION_EXIT_GAME = "exit_game"
const val ACTION_WSSFXX = "wssfxx"
const val ACTION_EXIT_POPUP = "exit_popup"

const val VALUE_PAY_CHANNEL_WECHAT_H5 = "wechatH5"
const val VALUE_PAY_CHANNEL_ALIPAY = "alipay"

/**
 * 参数传输需要的key常量
 */
const val KEY_PAY_RESULT = "key_pay_result"
const val KEY_PAY_INFO = "key_pay_info"
const val KEY_PAY_CONFIG = "key_pay_config"


/** 绿色  */
const val COLOR_GREEN = "#23C268"

/** 蓝色  */
const val COLOR_BLUE = "#4E8bbb"

/** 深黑色  */
const val COLOR_DEEP_DARK = "#333333"

/** 暗色  */
const val COLOR_DARK = "#666666"